package framework.command.impl;

import java.util.List;

import framework.account.IAccount;
import framework.account.IEntry;
import framework.command.ICommand;
import framework.factory.TransactionFactory;

public class AddInterestCommand implements ICommand {
	private List<IAccount> accounts;

    public AddInterestCommand(List<IAccount> accounts){
		this.accounts = accounts;
	}

	public void execute() {
		for(IAccount acc : accounts){
//			float previousBalance = acc.getBalance();
			acc.addInterest();
//			IEntry tr = TransactionFactory.createAddInterestTransaction(previousBalance, "success");
//			acc.addTransaction(tr);
		}

	}

}
